<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>

        .box{
            width: 250px;
            height: 251px;
            background-color: sandybrown;
        }
        .inner{
            width: 100px;
            height: 100px;
            background-color: sienna;
        }
    </style>
</head>
<body>
    
    <div id="app">

        <div class="box" @click="fn">
            <div class="inner" @click="fn1($event)"></div>
        </div>

        <a href="http://www.baidu.com" target="_blank" @click="fn2">百度</a>
    </div>

    <script src="../lib/Vue/vue.js"></script>
    <script>

        var vm = new Vue({
            el: '#app',
            data: {

            },
            methods: {
                fn() {
                    console.log('我是外面box');
                },
                fn1(e) {
                    e.stopPropagation() | (e.cancelBubble = true)
                    console.log('我是里面inner');
                },
                fn2() {
                    event.preventDefault ? event.preventDefault() : event.returnValue = false
                }
            }
        })
    </script>
</body>
</html>